﻿using System;
using System.Globalization;
using System.Windows.Data;

namespace MyFloridaHouse.libSvCommonUtilities.Converters
{
    //[ValueConversion(typeof(int), typeof(bool))]
    // convert to an opacity level from a bool
    public class ConvertBoolFromOpacity: IValueConverter
    {
        public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
        {
            int myOpacity;
            if ((bool)value)
            {
                myOpacity = 100;
            }
            else
            {
                myOpacity = 5;
            }
            return myOpacity;

        }

        public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
        {

            throw new NotImplementedException();
        }
    }
}
